package com.nbsaas.boot.user.data.entity;

import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.jpa.data.entity.AbstractEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Data;
import org.hibernate.annotations.Comment;

import java.util.Date;

@CreateByUser
@ComposeView
@Data
@FormAnnotation(title = "用户实名认证", model = "用户实名认证")
@Entity
@Table(name = "bs_user_verification")
@Comment("用户实名认证表")
public class UserVerification extends AbstractEntity {

    @Comment("用户ID")
    @FormField(title = "用户ID", sortNum = "1", grid = true, required = true)
    private Long userId;

    @Comment("真实姓名")
    @FormField(title = "真实姓名", sortNum = "2", grid = true, required = true)
    @Column(length = 50, nullable = false)
    private String realName;

    @Comment("身份证号")
    @FormField(title = "身份证号", sortNum = "3", grid = true, required = true)
    @Column(length = 20, nullable = false, unique = true)
    private String idCard;

    @Comment("身份证正面照片")
    @FormField(title = "身份证正面", sortNum = "4", type = InputType.image)
    @Column(length = 500)
    private String idCardFront;

    @Comment("身份证反面照片")
    @FormField(title = "身份证反面", sortNum = "5", type = InputType.image)
    @Column(length = 500)
    private String idCardBack;

    @Comment("手持身份证照片")
    @FormField(title = "手持身份证", sortNum = "6", type = InputType.image)
    @Column(length = 500)
    private String idCardHold;

    @Comment("认证状态")
    @FormField(title = "认证状态", sortNum = "7", grid = true, type = InputType.select)
    @Column(length = 20)
    private String status;

    @Comment("认证时间")
    @FormField(title = "认证时间", sortNum = "8", type = InputType.date, grid = true)
    private Date verifyTime;

    @Comment("审核人ID")
    @FormField(title = "审核人ID", sortNum = "9", grid = true)
    private Long auditorId;

    @Comment("审核时间")
    @FormField(title = "审核时间", sortNum = "10", type = InputType.date, grid = true)
    private Date auditTime;

    @Comment("审核结果")
    @FormField(title = "审核结果", sortNum = "11", grid = true, type = InputType.select)
    @Column(length = 20)
    private String auditResult;

    @Comment("审核意见")
    @FormField(title = "审核意见", sortNum = "12", type = InputType.textarea)
    @Column(length = 500)
    private String auditOpinion;

    @Comment("拒绝原因")
    @FormField(title = "拒绝原因", sortNum = "13", type = InputType.textarea)
    @Column(length = 500)
    private String rejectReason;

    @Comment("认证类型")
    @FormField(title = "认证类型", sortNum = "14", grid = true, type = InputType.select)
    @Column(length = 20)
    private String verifyType;

    @Comment("认证来源")
    @FormField(title = "认证来源", sortNum = "15", grid = true)
    @Column(length = 50)
    private String verifySource;

    @Comment("备注")
    @FormField(title = "备注", sortNum = "16", type = InputType.textarea)
    @Column(length = 500)
    private String note;
} 